<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>课工场论坛列表</title>
    <link href="css/bbs.css" rel="stylesheet">
    <script type="text/javascript">
    	
    	function fatie(){
    		var post=document.getElementById("post");
    		post.style.display="block";
    	}
    	function fabu(){
    		var tx=new Array("tou01.jpg","tou02.jpg","tou03.jpg","tou04.jpg");
    		var post=document.getElementById("post");
    		var ul=document.getElementsByTagName("ul");
    		var op=document.getElementById("as").value;
    		var d=new Date();
    		post.style.display="none";
    		var i=parseInt(Math.random()*(4-1)+1);
    		var li=document.createElement("li");
    		var div=document.crea
    		var img=document.createElement("img");
    		var h2=document.createElement("h2");
    		var span=document.createElement("span");
    		var div=document.createElement("div");
    		img.setAttribute("src",tx[i]);
    		var str=document.getElementById("title1").value;
    		h2.innerHTML=str;
    		span.innerHTML="<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;版本信息:"+op+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+"发布时间:"+d.toLocaleString();
    		h2.className="titlezi";
    		span.className="titlezi1";
    		div.className="tupian";
    		var va=ul[0].firstChild;
    		ul[0].insertBefore(li,va);
    		li.appendChild(div);
    		div.appendChild(img);
    		li.appendChild(h2);
    		h2.appendChild(span);
    	}
    </script>
</head>
<body>
<div class="bbs">
    <header><span onclick="fatie()">我要发帖</span></header>
    <section>
        <ul>
        	
        </ul>
    </section>
    <div id="post" class="post">
        <input class="title" id="title1" placeholder="请输入标题（1-50个字符）">
        所属版块：<select id="as">
        	<option>请选择版块</option>
        	<option>电子书籍</option>
        	<option>新课来了</option>
        	<option>新手报到</option>
        	<option>职业规划</option>
        </select>
        <textarea class="content"></textarea>
        <input class="btn" value="发布" onclick="fabu()">
    </div>
</div>
</body>
</html>